home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS03.ADF / Xref / strsave.c < prev    next >
C/C++ Source or Header  |  1986-04-02  |  351b  |  19 lines

  1. #include <stdio.h>
  2. #define DBUG 11
  3. char *strsave(s)  /* save string s somewhere */
  4. char *s;
  5. {
  6.      char *p,*getmem();
  7.  
  8.      if(fdebug(DBUG))
  9.          printf("strsave entry:  s = %s\n",s);
  10.  
  11.      if ((p = getmem(strlen(s)+1)) != NULL)
  12.          strcpy(p,s);
  13.  
  14.      if(fdebug(DBUG))
  15.          printf("strsave exit: returning pointer\n");
  16.  
  17.      return(p);
  18. }
  19.